<?php

/**
 * Description of SiteLogin
 *
 * @author LongLT
 */
Yii::import('application.models.AnnouncementAssign');
//Yii::import('application.models.AnnouncementView');
class InfoPost extends CWidget {
	public $data = null;
    public function run() {
		$data = $this->data;
		$viewNum	= AnnouncementAssign::model()->countView($data->id);
		$commentNum	= Comments::model()->countComment($data->id);
		//$joinNum	= AnnouncementAssign::model()->countJoin($data->id);
		//$unJoinNum	= AnnouncementAssign::model()->countJoin($data->id, 1);
        $this->render('InfoPost', compact('data', 'viewNum', 'commentNum'));
    }

}
